
package se.perp.c4.ui;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import javax.swing.JTextPane;


class JTextPaneAA extends JTextPane {

    @Override
    protected void paintComponent(Graphics g) {

        if (g instanceof Graphics2D) {
            Graphics2D g2;
            g2 = (Graphics2D) g;
            g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                    RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
            super.paintComponent(g2);
        } else {
            super.paintComponent(g);
        }

    }
}
